home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr44
/
ppl4c10.zip
/
ALLOCSEG.C
next >
Wrap
Text File
|
1995-02-06
|
318b
|
16 lines
/* allocseg.c */
#include <stdio.h>
#include <malloc.h>
#include <dos.h>
int AllocSeg(int Size)
{int Seg;
char far *Ptr;
/* allocate far heap */
Ptr = (char far *) _fmalloc(Size+16);
if(Ptr==NULL) return 0;
/* SEG:0 points to buffer */
Seg = FP_SEG(Ptr) + ((FP_OFF(Ptr)+15)>>4);
return Seg;
}